// 文本辅助类
.tl {
  text-align: left !important;
}
.tr {
  text-align: right !important;
}
.tc {
  text-align: center !important;
}
.tj {
  text-align: justify;
}
.tn {
  white-space: nowrap;
}
.b {
  font-weight: 700;
}

// 填充边距方法
@list-padding-margin: 5, 10, 15, 20, 25, 30, 35, 40, 45, 50;
.padding-margin (@className, @value, @attr ) {
  .@{className}@{value} {
    @{attr}: @value * 1px;
  }
}
.padding-margin (@className, @value, @attr, @other: '', @flag) when (boolean(@flag)) {
  .@{className}@{value} {
    @{attr}: @value * 1px;
    @{other}: @value * 1px;
  }
}
each(@list-padding-margin, {
  //默认填充
  .padding-margin(pt, @value, padding-top);
  .padding-margin(pr, @value, padding-right);
  .padding-margin(pb, @value, padding-bottom);
  .padding-margin(pl, @value, padding-left);
  .padding-margin(px, @value, padding-left, padding-right, true);
  .padding-margin(py, @value, padding-top, padding-bottom, true);
  .padding-margin(pd, @value, padding);
  //默认边距
  .padding-margin(mt, @value, margin-top);
  .padding-margin(mr, @value, margin-right);
  .padding-margin(mb, @value, margin-bottom);
  .padding-margin(ml, @value, margin-left);
  .padding-margin(mx, @value, margin-left, margin-right, true);
  .padding-margin(my, @value, margin-top, margin-bottom, true);
  .padding-margin(mg, @value, margin);
})


//浮动
.clear {
  &:before,
  &:after {
    display: table;
  }
  &:after {
    content: '';
    clear: both;
  }
}
.fl,
.fr {
  display: inline;
}
.fr {
  float: right;
}
.fl {
  float: left;
}

//单行文字溢出省略号
.ell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.ell (@multi-line: false, @line-clamp: 0, @box-orient: initial) when (@multi-line) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: @line-clamp; // number行数
  -webkit-box-orient: @box-orient; //方向 vertical
}

.ell-2 {
  .ell(true, 2, vertical);
}
.ell-3 {
  .ell(true, 3, vertical);
}

.scroll,
.scroll-y,
.scroll-x {
  &::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  &::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: rgba(51, 51, 51, 0.15);
  }
}
.scroll {
  overflow: auto;
}
.scroll-y {
  overflow-y: auto;
}
.scroll-x {
  overflow-x: auto;
}
